3.3.27 \(\int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx\) [227]

3.3.27.1 Optimal result
3.3.27.2 Mathematica [A] (verified)
3.3.27.3 Rubi [A] (verified)
3.3.27.4 Maple [A] (verified)
3.3.27.5 Fricas [A] (verification not implemented)
3.3.27.6 Sympy [B] (verification not implemented)
3.3.27.7 Maxima [A] (verification not implemented)
3.3.27.8 Giac [A] (verification not implemented)
3.3.27.9 Mupad [B] (verification not implemented)

3.3.27.1 Optimal result

Integrand size = 24, antiderivative size = 116 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=\frac {7}{8} a c^4 x+\frac {7 a c^4 \cos ^3(e+f x)}{12 f}+\frac {7 a c^4 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{5 f}+\frac {7 a \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{20 f} \]

output
7/8*a*c^4*x+7/12*a*c^4*cos(f*x+e)^3/f+7/8*a*c^4*cos(f*x+e)*sin(f*x+e)/f+1/ 
5*a*cos(f*x+e)^3*(c^2-c^2*sin(f*x+e))^2/f+7/20*a*cos(f*x+e)^3*(c^4-c^4*sin 
(f*x+e))/f
 
3.3.27.2 Mathematica [A] (verified)

Time = 0.72 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.55 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=\frac {a c^4 (420 f x+420 \cos (e+f x)+130 \cos (3 (e+f x))-6 \cos (5 (e+f x))+120 \sin (2 (e+f x))-45 \sin (4 (e+f x)))}{480 f} \]

input
Integrate[(a + a*Sin[e + f*x])*(c - c*Sin[e + f*x])^4,x]
 
output
(a*c^4*(420*f*x + 420*Cos[e + f*x] + 130*Cos[3*(e + f*x)] - 6*Cos[5*(e + f 
*x)] + 120*Sin[2*(e + f*x)] - 45*Sin[4*(e + f*x)]))/(480*f)
 
3.3.27.3 Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.02, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.458, Rules used = {3042, 3215, 3042, 3157, 3042, 3157, 3042, 3148, 3042, 3115, 24}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a \sin (e+f x)+a) (c-c \sin (e+f x))^4 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \sin (e+f x)+a) (c-c \sin (e+f x))^4dx\)

\(\Big \downarrow \) 3215

\(\displaystyle a c \int \cos ^2(e+f x) (c-c \sin (e+f x))^3dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a c \int \cos (e+f x)^2 (c-c \sin (e+f x))^3dx\)

\(\Big \downarrow \) 3157

\(\displaystyle a c \left (\frac {7}{5} c \int \cos ^2(e+f x) (c-c \sin (e+f x))^2dx+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a c \left (\frac {7}{5} c \int \cos (e+f x)^2 (c-c \sin (e+f x))^2dx+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 3157

\(\displaystyle a c \left (\frac {7}{5} c \left (\frac {5}{4} c \int \cos ^2(e+f x) (c-c \sin (e+f x))dx+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a c \left (\frac {7}{5} c \left (\frac {5}{4} c \int \cos (e+f x)^2 (c-c \sin (e+f x))dx+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 3148

\(\displaystyle a c \left (\frac {7}{5} c \left (\frac {5}{4} c \left (c \int \cos ^2(e+f x)dx+\frac {c \cos ^3(e+f x)}{3 f}\right )+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a c \left (\frac {7}{5} c \left (\frac {5}{4} c \left (c \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx+\frac {c \cos ^3(e+f x)}{3 f}\right )+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 3115

\(\displaystyle a c \left (\frac {7}{5} c \left (\frac {5}{4} c \left (c \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )+\frac {c \cos ^3(e+f x)}{3 f}\right )+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

\(\Big \downarrow \) 24

\(\displaystyle a c \left (\frac {7}{5} c \left (\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}+\frac {5}{4} c \left (\frac {c \cos ^3(e+f x)}{3 f}+c \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )\right )\right )+\frac {c \cos ^3(e+f x) (c-c \sin (e+f x))^2}{5 f}\right )\)

input
Int[(a + a*Sin[e + f*x])*(c - c*Sin[e + f*x])^4,x]
 
output
a*c*((c*Cos[e + f*x]^3*(c - c*Sin[e + f*x])^2)/(5*f) + (7*c*((Cos[e + f*x] 
^3*(c^2 - c^2*Sin[e + f*x]))/(4*f) + (5*c*((c*Cos[e + f*x]^3)/(3*f) + c*(x 
/2 + (Cos[e + f*x]*Sin[e + f*x])/(2*f))))/4))/5)
 

3.3.27.3.1 Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3148
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + 
 Simp[a   Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && 
 (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
 

rule 3157
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + 
f*x])^(m - 1)/(f*g*(m + p))), x] + Simp[a*((2*m + p - 1)/(m + p))   Int[(g* 
Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, 
g, m, p}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, 0] && NeQ[m + p, 0] && Integers 
Q[2*m, 2*p]
 

rule 3215
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + 
(f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m   Int[Cos[e + f*x]^(2*m)*(c + 
 d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ 
b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] &&  !(IntegerQ[n] && ((Lt 
Q[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
 
3.3.27.4 Maple [A] (verified)

Time = 2.08 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.59

method result size
parallelrisch \(\frac {a \,c^{4} \left (420 f x +420 \cos \left (f x +e \right )-6 \cos \left (5 f x +5 e \right )-45 \sin \left (4 f x +4 e \right )+130 \cos \left (3 f x +3 e \right )+120 \sin \left (2 f x +2 e \right )+544\right )}{480 f}\) \(68\)
risch \(\frac {7 a \,c^{4} x}{8}+\frac {7 a \,c^{4} \cos \left (f x +e \right )}{8 f}-\frac {a \,c^{4} \cos \left (5 f x +5 e \right )}{80 f}-\frac {3 a \,c^{4} \sin \left (4 f x +4 e \right )}{32 f}+\frac {13 a \,c^{4} \cos \left (3 f x +3 e \right )}{48 f}+\frac {a \,c^{4} \sin \left (2 f x +2 e \right )}{4 f}\) \(96\)
derivativedivides \(\frac {-\frac {a \,c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-3 a \,c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{4} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+3 a \,c^{4} \cos \left (f x +e \right )+a \,c^{4} \left (f x +e \right )}{f}\) \(149\)
default \(\frac {-\frac {a \,c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-3 a \,c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{4} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+3 a \,c^{4} \cos \left (f x +e \right )+a \,c^{4} \left (f x +e \right )}{f}\) \(149\)
parts \(a \,c^{4} x -\frac {a \,c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5 f}+\frac {3 a \,c^{4} \cos \left (f x +e \right )}{f}+\frac {2 a \,c^{4} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {2 a \,c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3 f}-\frac {3 a \,c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) \(156\)
norman \(\frac {\frac {6 a \,c^{4} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {34 a \,c^{4}}{15 f}+\frac {7 a \,c^{4} x}{8}+\frac {20 a \,c^{4} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {16 a \,c^{4} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {16 a \,c^{4} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {a \,c^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {13 a \,c^{4} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {13 a \,c^{4} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {a \,c^{4} \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {35 a \,c^{4} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}+\frac {35 a \,c^{4} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {35 a \,c^{4} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {35 a \,c^{4} x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}+\frac {7 a \,c^{4} x \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{5}}\) \(282\)

input
int((a+a*sin(f*x+e))*(c-c*sin(f*x+e))^4,x,method=_RETURNVERBOSE)
 
output
1/480*a*c^4*(420*f*x+420*cos(f*x+e)-6*cos(5*f*x+5*e)-45*sin(4*f*x+4*e)+130 
*cos(3*f*x+3*e)+120*sin(2*f*x+2*e)+544)/f
 
3.3.27.5 Fricas [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.66 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=-\frac {24 \, a c^{4} \cos \left (f x + e\right )^{5} - 160 \, a c^{4} \cos \left (f x + e\right )^{3} - 105 \, a c^{4} f x + 15 \, {\left (6 \, a c^{4} \cos \left (f x + e\right )^{3} - 7 \, a c^{4} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \]

input
integrate((a+a*sin(f*x+e))*(c-c*sin(f*x+e))^4,x, algorithm="fricas")
 
output
-1/120*(24*a*c^4*cos(f*x + e)^5 - 160*a*c^4*cos(f*x + e)^3 - 105*a*c^4*f*x 
 + 15*(6*a*c^4*cos(f*x + e)^3 - 7*a*c^4*cos(f*x + e))*sin(f*x + e))/f
 
3.3.27.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (109) = 218\).

Time = 0.28 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.71 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=\begin {cases} - \frac {9 a c^{4} x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {9 a c^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + a c^{4} x \sin ^{2}{\left (e + f x \right )} - \frac {9 a c^{4} x \cos ^{4}{\left (e + f x \right )}}{8} + a c^{4} x \cos ^{2}{\left (e + f x \right )} + a c^{4} x - \frac {a c^{4} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {15 a c^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 a c^{4} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a c^{4} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {9 a c^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {a c^{4} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {8 a c^{4} \cos ^{5}{\left (e + f x \right )}}{15 f} - \frac {4 a c^{4} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 a c^{4} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\left (e \right )} + a\right ) \left (- c \sin {\left (e \right )} + c\right )^{4} & \text {otherwise} \end {cases} \]

input
integrate((a+a*sin(f*x+e))*(c-c*sin(f*x+e))**4,x)
 
output
Piecewise((-9*a*c**4*x*sin(e + f*x)**4/8 - 9*a*c**4*x*sin(e + f*x)**2*cos( 
e + f*x)**2/4 + a*c**4*x*sin(e + f*x)**2 - 9*a*c**4*x*cos(e + f*x)**4/8 + 
a*c**4*x*cos(e + f*x)**2 + a*c**4*x - a*c**4*sin(e + f*x)**4*cos(e + f*x)/ 
f + 15*a*c**4*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4*a*c**4*sin(e + f*x)** 
2*cos(e + f*x)**3/(3*f) - 2*a*c**4*sin(e + f*x)**2*cos(e + f*x)/f + 9*a*c* 
*4*sin(e + f*x)*cos(e + f*x)**3/(8*f) - a*c**4*sin(e + f*x)*cos(e + f*x)/f 
 - 8*a*c**4*cos(e + f*x)**5/(15*f) - 4*a*c**4*cos(e + f*x)**3/(3*f) + 3*a* 
c**4*cos(e + f*x)/f, Ne(f, 0)), (x*(a*sin(e) + a)*(-c*sin(e) + c)**4, True 
))
 
3.3.27.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.26 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=-\frac {32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a c^{4} - 320 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c^{4} + 45 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{4} - 240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{4} - 480 \, {\left (f x + e\right )} a c^{4} - 1440 \, a c^{4} \cos \left (f x + e\right )}{480 \, f} \]

input
integrate((a+a*sin(f*x+e))*(c-c*sin(f*x+e))^4,x, algorithm="maxima")
 
output
-1/480*(32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*a*c^4 
- 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*a*c^4 + 45*(12*f*x + 12*e + sin(4* 
f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*c^4 - 240*(2*f*x + 2*e - sin(2*f*x + 2* 
e))*a*c^4 - 480*(f*x + e)*a*c^4 - 1440*a*c^4*cos(f*x + e))/f
 
3.3.27.8 Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.82 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=\frac {7}{8} \, a c^{4} x - \frac {a c^{4} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {13 \, a c^{4} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} + \frac {7 \, a c^{4} \cos \left (f x + e\right )}{8 \, f} - \frac {3 \, a c^{4} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a c^{4} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]

input
integrate((a+a*sin(f*x+e))*(c-c*sin(f*x+e))^4,x, algorithm="giac")
 
output
7/8*a*c^4*x - 1/80*a*c^4*cos(5*f*x + 5*e)/f + 13/48*a*c^4*cos(3*f*x + 3*e) 
/f + 7/8*a*c^4*cos(f*x + e)/f - 3/32*a*c^4*sin(4*f*x + 4*e)/f + 1/4*a*c^4* 
sin(2*f*x + 2*e)/f
 
3.3.27.9 Mupad [B] (verification not implemented)

Time = 8.88 (sec) , antiderivative size = 292, normalized size of antiderivative = 2.52 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx=\frac {7\,a\,c^4\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{24}-\frac {a\,c^4\,\left (525\,e+525\,f\,x+640\right )}{120}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{24}-\frac {a\,c^4\,\left (525\,e+525\,f\,x+720\right )}{120}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{12}-\frac {a\,c^4\,\left (1050\,e+1050\,f\,x+800\right )}{120}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{12}-\frac {a\,c^4\,\left (1050\,e+1050\,f\,x+1920\right )}{120}\right )-\frac {a\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {13\,a\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{2}+\frac {13\,a\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{2}+\frac {a\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{4}+\frac {a\,c^4\,\left (105\,e+105\,f\,x\right )}{120}-\frac {a\,c^4\,\left (105\,e+105\,f\,x+272\right )}{120}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^5} \]

input
int((a + a*sin(e + f*x))*(c - c*sin(e + f*x))^4,x)
 
output
(7*a*c^4*x)/8 - (tan(e/2 + (f*x)/2)^2*((a*c^4*(105*e + 105*f*x))/24 - (a*c 
^4*(525*e + 525*f*x + 640))/120) + tan(e/2 + (f*x)/2)^8*((a*c^4*(105*e + 1 
05*f*x))/24 - (a*c^4*(525*e + 525*f*x + 720))/120) + tan(e/2 + (f*x)/2)^4* 
((a*c^4*(105*e + 105*f*x))/12 - (a*c^4*(1050*e + 1050*f*x + 800))/120) + t 
an(e/2 + (f*x)/2)^6*((a*c^4*(105*e + 105*f*x))/12 - (a*c^4*(1050*e + 1050* 
f*x + 1920))/120) - (a*c^4*tan(e/2 + (f*x)/2))/4 - (13*a*c^4*tan(e/2 + (f* 
x)/2)^3)/2 + (13*a*c^4*tan(e/2 + (f*x)/2)^7)/2 + (a*c^4*tan(e/2 + (f*x)/2) 
^9)/4 + (a*c^4*(105*e + 105*f*x))/120 - (a*c^4*(105*e + 105*f*x + 272))/12 
0)/(f*(tan(e/2 + (f*x)/2)^2 + 1)^5)